package cn.edu.sig.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.sig.bean.Goods;
import cn.edu.sig.bean.Image;
import cn.edu.sig.dao.ImageDao;

@Service("imageService")
@Transactional
public class ImageService {

	@Resource(name="imageDao")
	private ImageDao imageDao;
	
	public void batchInsert(List<Image> images){
		
		imageDao.batchInsert(images);
	}
	
	public List<Image> findByGoods(Goods goods){
		
		return imageDao.findAllByGoods(goods);
		
	}
}
